package org.csu.mypetstore.service;

import org.csu.mypetstore.domain.UserCart;
import org.csu.mypetstore.persistence.CartDao;
import org.csu.mypetstore.persistence.impl.CartDaoImpl;

import java.util.List;

public class UserCartService {
    CartDao userCart;
    public UserCartService()
    {
        userCart=new CartDaoImpl();
    }
    public List<UserCart> getCartListByUserid(String userid)
    {
        return userCart.getCartListByUserid(userid);
    }
    public void insertCartList(UserCart cart)
    {
        userCart.insertCartList(cart);
    }
    public void updateCartList(UserCart cart)
    {
        userCart.updateCartList(cart);
    }
    public boolean selectCartList(UserCart cart)
    {
        return userCart.selectCartList(cart);
    }
    public UserCart getUserCart(String userid)
    {
        return userCart.getUserCart(userid);
    }

}
